import request from '@/utils/request'
import qs from "qs";
// 查询下载列表
export function listDownload(query) {
  return request({
    url: '/system/download/list',
    method: 'get',
    params: query
  })
}

// 查询下载详细
export function getDownload(id) {
  return request({
    url: '/system/download/' + id,
    method: 'get'
  })
}

// 新增下载
export function addDownload(data) {
  return request({
    url: "/system/download",
    method: "post",
    data: qs.stringify(data),
    headers: {
      "content-type": "application/x-www-form-urlencoded",
    },
  });
}

// 修改下载
export function updateDownload(data) {
  return request({
    url: "/system/download",
    method: "put",
    data: qs.stringify(data),
    headers: {
      "content-type": "application/x-www-form-urlencoded",
    },
  });
}

// 删除下载
export function delDownload(id) {
  return request({
    url: '/system/download/' + id,
    method: 'delete'
  })
}
